﻿using System.Runtime.Serialization;

namespace HCMS.Web.Manage.Models
{
    /// <summary>
    /// 消息中心 消息项 模型
    /// </summary>
    [DataContract(Name = "messageCenterItem")]
    public class MessageCenterItemModel
    {
        /// <summary>
        /// 类型 Id
        /// </summary>
        [DataMember(Name = "id")]
        public int Id { get; set; }

        /// <summary>
        /// 类型标题
        /// </summary>
        [DataMember(Name = "title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 消息列表
        /// </summary>
        [DataMember(Name = "children")]
        public List<MessageCenterMsgModel> Children { get; set; } = new List<MessageCenterMsgModel>();
    }

    /// <summary>
    /// 消息中心 消息 模型
    /// </summary>
    [DataContract(Name = "MessageCenterMsg")]
    public class MessageCenterMsgModel
    {
        /// <summary>
        /// Id
        /// </summary>
        [DataMember(Name = "id")]
        public int Id { get; set; }

        /// <summary>
        /// 徽章标识
        /// </summary>
        [DataMember(Name = "avatar")]
        public string Avatar { get; set; } = "";

        /// <summary>
        /// 标题
        /// </summary>
        [DataMember(Name = "title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 内容
        /// </summary>
        [DataMember(Name = "context")]
        public string Context { get; set; } = "";

        /// <summary>
        /// 形式
        /// </summary>
        /// <remarks>
        /// 可自定义字段。
        /// 
        /// 系统公告：表示是否已读
        /// </remarks>
        [DataMember(Name = "form")]
        public string Form { get; set; } = "";

        /// <summary>
        /// 时间
        /// </summary>
        [DataMember(Name = "time")]
        public string Time { get; set; } = "";
    }
}